<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
namespace Admin\Model;
use Think\Model;
class Adminusermodel extends Model{
        public function userlogin($name,$pass){
        $map=array();
        $map['name']=trim($name);
        $map['pass']=trim(md5($pass));
        return $this->where($map)->find();
    }
    public function userfind($name){
        $map=array();
        $map['name']=trim($name);
        return $this->where($map)->find();
    }
    public function register($name,$pass){
        $map=array();
        $map['name']=trim($name);
        $map['pass']=trim(md5($pass));
        return $this->data($map)->add();
    }
}
